From 47ef300b855a8aaab89c665f7014963523a7d15c Mon Sep 17 00:00:00 2001 From: justbur Date: Thu, 10 Dec 2015 20:02:58 -0500 Subject: [PATCH] Add which-key-init-buffer-hook --- which-key.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index 8254b60eb15..5986ae6af7c 100644 --- a/which-key.el +++ b/which-key.el @@ -321,6 +321,10 @@ See http://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html" :group 'which-key :type 'boolean) +;; Hooks +(defvar which-key-init-buffer-hook '() + "Hook run when which-key buffer is initialized.") + ;; Faces (defgroup which-key-faces nil "Faces for which-key-mode" @@ -503,7 +507,8 @@ alongside the actual current key sequence when (setq-local cursor-type nil) (setq-local cursor-in-non-selected-windows nil) (setq-local mode-line-format nil) - (setq-local word-wrap nil)))) + (setq-local word-wrap nil) + (run-hooks 'which-key-init-buffer-hook)))) (defun which-key--setup () "Initial setup for which-key. -- 2.30.2